#!/bin/sh
#
MARCIMPORT=/usr/local/marcimport
SABRE=/usr/local/vufind-smu
# Disable JETTY_CONSOLE output -- it causes problems when run by cron:
export JETTY_CONSOLE=/dev/null
#
date
#
############################################
# Get files...
cd $MARCIMPORT
pwd
cd partial
cd brightonincoming
rm *
# brightonincoming is now empty.
cp -p /home/brightonimport/grabbed.bibsg7.mrc .
#scp talis@ustalis:/scratch/Aqua/initial/bib/prod_talis/norm/grabbed.bibsg5.mrc .
echo "Brighton file copy complete"
date
cd ..
#cd brightonprocessed
$SABRE/marc_merge_vufind.pl brightonincoming/grabbed.bibsg7.mrc brightonprocessed/brighton7.mrc brighton
cd $SABRE
./import-marc.sh $MARCIMPORT/partial/brightonprocessed/brighton7.mrc
sleep 10
cd $SABRE
cd util
php optimize.php
date
echo "brighton import and optimise complete"
